package com.lineage.config;

import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Properties;

public final class ConfigAi {
  public static boolean longntimeai_3;
  
  public static int logintime;
  
  public static int aitimeran;
  
  public static int aitimelast;
  
  public static boolean ALTE;
  
  public static int aialteitem;
  
  public static int aialteitemcount = 0;
  
  public static boolean kickai;
  
  public static int aiX = 0;
  
  public static int aiY = 0;
  
  public static int aimap = 0;
  
  public static String msg0;
  
  public static String msg1;
  
  public static String msg2;
  
  public static String msg3;
  
  public static String msg4;
  
  public static String msg5;
  
  public static String msg6;
  
  public static String msg7;
  
  public static String msg8;
  
  public static String msg9;
  
  public static String msg10;
  
  public static String msg11;
  
  public static String msg12;
  
  public static int AIeffect;
  
  private static final String OTHER_SETTINGS_FILE = "./config/其他控制端/外挂侦测.properties";
  
  public static void load() throws ConfigErrorException {
    Properties set = new Properties();
    try {
      InputStream is = new FileInputStream(new File("./config/其他控制端/外挂侦测.properties"));
      InputStreamReader isr = new InputStreamReader(is, "utf-8");
      set.load(isr);
      is.close();
      longntimeai_3 = Boolean.parseBoolean(set.getProperty("longntimeai_3", "false"));
      logintime = Integer.parseInt(set.getProperty("logintime", "0"));
      aitimeran = Integer.parseInt(set.getProperty("aitimeran", "0"));
      aitimelast = Integer.parseInt(set.getProperty("aitimelast", "0"));
      ALTE = Boolean.parseBoolean(set.getProperty("ALTE", "false"));
      aialteitem = Integer.parseInt(set.getProperty("aialteitem", "0"));
      aialteitemcount = Integer.parseInt(set.getProperty("aialteitemcount", "0"));
      kickai = Boolean.parseBoolean(set.getProperty("kickai", "false"));
      aiX = Integer.parseInt(set.getProperty("aiX", "0"));
      aiY = Integer.parseInt(set.getProperty("aiY", "0"));
      aimap = Integer.parseInt(set.getProperty("aimap", "0"));
      msg0 = set.getProperty("msg0", "");
      msg1 = set.getProperty("msg1", "");
      msg2 = set.getProperty("msg2", "");
      msg3 = set.getProperty("msg3", "");
      msg4 = set.getProperty("msg4", "");
      msg5 = set.getProperty("msg5", "");
      msg6 = set.getProperty("msg6", "");
      msg7 = set.getProperty("msg7", "");
      msg8 = set.getProperty("msg8", "");
      msg9 = set.getProperty("msg9", "");
      msg10 = set.getProperty("msg10", "");
      msg11 = set.getProperty("msg11", "");
      msg12 = set.getProperty("msg12", "");
      AIeffect = Integer.parseInt(set.getProperty("AIeffect", "0"));
    } catch (Exception e) {
      throw new ConfigErrorException("设置档案遗失: ./config/其他控制端/外挂侦测.properties");
    } finally {
      set.clear();
    } 
  }
}
